/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2023. All rights reserved.
 * Description: UDK IO for x86 architecture header file
 * Author: -
 * Create: 2021.5.26
 */

#ifndef UDK_IO_X86_H
#define UDK_IO_X86_H

#include <stdint.h>

#include "udk_common.h"
#include "udk_membarrier.h"

#define udk_io_wmb() udk_compiler_barrier()
#define udk_io_rmb() udk_compiler_barrier()
#define udk_io_mb() udk_mb()

static udk_force_inline void udk_write64_relaxed(uint64_t value, volatile void *addr)
{
    *(volatile uint64_t *)addr = value;
}

#endif /* UDK_IO_X86_H */